package com.xmy.cultivate.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xmy.cultivate.entity.ClassRoom;
import com.xmy.cultivate.mapper.ClassRoomMapper;
import com.xmy.cultivate.service.IClassRoomService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 教室 服务实现类
 * </p>
 *
 * @author min
 * @since 2022-07-26
 */
@Service
public class ClassRoomServiceImpl extends ServiceImpl<ClassRoomMapper, ClassRoom> implements IClassRoomService {

    @Autowired
    ClassRoomMapper classRoomMapper;

    public IPage<Map<String, Object>> findAll(IPage<?> page, Wrapper wrapper) {
        return classRoomMapper.findAll(page, wrapper);
    }

    public IPage<Map<String, Object>> checkClassRoomByStatus(IPage<?> page, Wrapper wrapper, String schoolId, String yearPart, String quarterNum, String lessonType, String timeStart, String timeEnd, String weekDates) {
        return classRoomMapper.checkClassRoomByStatus(page, wrapper, schoolId, yearPart, quarterNum, lessonType, timeStart, timeEnd, weekDates);
    }

    @Override
    public List<ClassRoom> getGradeClassRoomList(Long schoolId, Integer yearPart, Integer quarterNum, Integer lessonType, Integer sourseLeve, Long adminId) {
        return classRoomMapper.getGradeClassRoomList(schoolId, yearPart, quarterNum, lessonType, sourseLeve, adminId);
    }

    @Override
    public List<ClassRoom> getGradeClassRooms(Long schoolId, Integer yearPart, Integer quarterNum, Integer begin, Integer end, Integer lessonType) {
        return classRoomMapper.getGradeClassRooms(schoolId, yearPart, quarterNum, begin, end, lessonType);
    }

    @Override
    public List<ClassRoom> getGradeClassRooms1(Long schoolId, Integer yearPart, Integer quarterNum, String week, Integer lessonType) {
        return classRoomMapper.getGradeClassRooms1(schoolId, yearPart, quarterNum, week, lessonType);
    }

    @Override
    public List<ClassRoom> getGradeClassRoomsByName(Long schoolId, Integer yearPart, Integer quarterNum, String week, Integer lessonType) {
        return classRoomMapper.getGradeClassRoomsByName(schoolId, yearPart, quarterNum, week, lessonType);
    }

    @Override
    public List<ClassRoom> getGradeClassRoomsByName1(Long schoolId, Integer yearPart, Integer quarterNum, Integer begin, Integer end, Integer lessonType) {
        return classRoomMapper.getGradeClassRoomsByName1(schoolId, yearPart, quarterNum, begin, end, lessonType);
    }


}
